namespace CinemaDirector
{
	public class MultiCurveTrack : ActorTrack
	{
		public override TimelineItem[] TimelineItems
		{
			get
			{
				return GetComponentsInChildren<CinemaMultiActorCurveClip>();
			}
		}

		public override void Initialize()
		{
			TimelineItem[] array = TimelineItems;
			for (int i = 0; i < array.Length; i++)
			{
				CinemaMultiActorCurveClip cinemaMultiActorCurveClip = (CinemaMultiActorCurveClip)array[i];
				cinemaMultiActorCurveClip.Initialize();
			}
		}

		public override void UpdateTrack(float time, float deltaTime)
		{
			elapsedTime = time;
			TimelineItem[] array = TimelineItems;
			for (int i = 0; i < array.Length; i++)
			{
				CinemaMultiActorCurveClip cinemaMultiActorCurveClip = (CinemaMultiActorCurveClip)array[i];
				cinemaMultiActorCurveClip.SampleTime(time);
			}
		}

		public override void SetTime(float time)
		{
			elapsedTime = time;
			TimelineItem[] array = TimelineItems;
			for (int i = 0; i < array.Length; i++)
			{
				CinemaMultiActorCurveClip cinemaMultiActorCurveClip = (CinemaMultiActorCurveClip)array[i];
				cinemaMultiActorCurveClip.SampleTime(time);
			}
		}

		public override void Stop()
		{
			TimelineItem[] array = TimelineItems;
			for (int i = 0; i < array.Length; i++)
			{
				CinemaMultiActorCurveClip cinemaMultiActorCurveClip = (CinemaMultiActorCurveClip)array[i];
				cinemaMultiActorCurveClip.Revert();
			}
		}
	}
}
